package com.ruoyi.pay.controller;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.pay.entity.PayDTO;
import com.ruoyi.pay.service.AggregationPayService;
import com.ruoyi.pay.service.AliPayService;
import com.ruoyi.pay.service.WXPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("payagg")
public class payAggregationController {

    @Autowired
    AggregationPayService aggregationPayService;

    /**
     * 统一支付接口
     * @param orderId
     * @param payType
     * @return
     */
    @GetMapping("aggregationPay")
    public String aggregationPay(@RequestParam("orderId") Integer orderId,
                                     @RequestParam("payType") Integer payType) throws Exception {
        //支付类型1 支付宝  支付类型二 微信支付 //支付类型 3  扫脸支付
    return aggregationPayService.aggregationPay(orderId,payType);
    }
}
